Skip to content

fix: There is no business requirement to enter very small values for traveltime#873

Draft
aiAdrian wants to merge 1 commit intomainfrom
846-trainrunsectionvalidator-does-not-take-into-account-the-current-timedisplayprecision-value
Draft

fix: There is no business requirement to enter very small values for traveltime#873
aiAdrian wants to merge 1 commit intomainfrom
846-trainrunsectionvalidator-does-not-take-into-account-the-current-timedisplayprecision-value

Conversation

@aiAdrian
Copy link
Copy Markdown
Contributor

@aiAdrian aiAdrian commented Mar 4, 2026

Since 0.01 min equals 0.6 s, we enforce that such values are not allowed internally. I double checked this assumption with Martin (BO) Netzgrafik at SBB.

The validator warning should only be triggered when e.g. a third‑party JSON file is imported. For strategic planning, the minimum allowed value is 0.1.

OSRD? What do you have a minimal travelTime for edges (second) .... ?

@louisgreiner

@aiAdrian
Copy link
Copy Markdown
Contributor Author

aiAdrian commented Mar 4, 2026

I just add some comments. At the moment for me the fix is not yet clear. What we like to fix and how in detail!

@aiAdrian aiAdrian marked this pull request as draft March 4, 2026 16:29
@aiAdrian aiAdrian force-pushed the 846-trainrunsectionvalidator-does-not-take-into-account-the-current-timedisplayprecision-value branch from eaf4a43 to 3c731a5 Compare March 4, 2026 16:30
@aiAdrian aiAdrian changed the title fix: There is no business required to enter very small values for traveltime fix: There is no business requirement to enter very small values for traveltime Mar 4, 2026
@emersion
Copy link
Copy Markdown
Member

emersion commented Mar 4, 2026

In OSRD our minimum travel time is 1 microsecond (PostgreSQL time resolution).

I would be careful about forbidding small values since these can happen pretty easily when adding intermediate stops.

Maybe we can allow such values but still show a warning?

@aiAdrian
Copy link
Copy Markdown
Contributor Author

aiAdrian commented Mar 6, 2026

In OSRD our minimum travel time is 1 microsecond (PostgreSQL time resolution).

I would be careful about forbidding small values since these can happen pretty easily when adding intermediate stops.

Maybe we can allow such values but still show a warning?

Thanks for this information. In Netzgrafik the time are in Minutes 🫠

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TrainrunSectionValidator does not take into account the current TimeDisplayPrecision value

2 participants